<!DOCTYPE html>
<html>

<head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>旅游问答</title>
    <link href="/styles/base.css" rel="stylesheet" type="text/css">
    <link href="/js/datepicker/datepicker.css" rel="stylesheet">
    <link href="/styles/wenda.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/jquery-form/jquery.form.js"></script>
    <script type="text/javascript" src="/js/system/wenda.js"></script>
    <link href="/js/plugins/jqPaginator/jqPagination.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/plugins/jqPaginator/jq-paginator.min.js"></script>
    <style>
        .div1 {
            display: inline-block;
        }

        .div2 {
            display: inline-block;
        }

        .btn-ask:hover, .btn-ask2 {
            background-color: #ffa800;
            text-decoration: none;
            color: #fff;
        }

        .btn-ask {
            display: block;
            border-radius: 4px;
            margin-top: 73px;
            height: 46px;
            background-color: #f4f4f4;
            line-height: 46px;
            color: #ff8a00;
            font-size: 16px;
            text-align: center;
            _padding-top: 14px;
            _height: 32px;
            _line-height: 20px;
            overflow: hidden
        }
    </style>

    <script>

        // .bar_share
        // color:#000000
        $(function () {
            $('.subBtn').click(function () {
                var $btn = $(this);
                var type = $btn.data('type');
                $('#type').val(type);
                $('#searchForm').submit();
            })
        })
    </script>

</head>

<body style="position: relative;">

<#assign currentNav="wenda">
<#include "../common/navbar.ftl">
<div class="wrapper wrapper-new">
    <div class="col-main">
        <div class="div1 title">
            <a href="javascript:;" class="bs_btn subBtn on" data-type="1" style=" font-size:20px;"><h3>
                    热门问答</h3></a></div>
        &emsp;&emsp;&emsp;
        <div class="div1 title">
            <a href="javascript:;" class="bs_btn subBtn" data-type="0" style=" font-size:20px;"><h3>
                    最新问答</h3></a></div>


        <div class="newcate-wrap _j_qa_list">
            <form id="searchForm" action="/wenda/" method="post">
                <input name="currentPage" id="currentPage" type="hidden" value="${(qo.currentPage)!1}">
                <input name="type" id="type" value="${(qo.type)!}" type="hidden">
            </form>
            <#list pageInfo.list as q>
                <div class="bd newcate-bd">
                    <ul class="_j_pager_box">
                        <li class="item clearfix _j_question_item" data-qid="793682">
                            <div class="title">
                                <a href="/wenda/detail?id=${q.id}" target="_blank">${q.title!}</a></div>
                            <div class="container">
                                <#list q.answers as a>
                                    <div>
                                        <div class="avatar"><a href="javascript:;" target="_blank"
                                                               class="_j_filter_click"><img
                                                        class="_j_filter_click"
                                                        src="${(a.author.headImgUrl)!}"></a>
                                        </div>

                                        <div class="user-info">
                                            <a class="name _j_filter_click" href="javascript:;"
                                               target="_blank">${a.author.nickname!}</a>
                                            <a class="level _j_filter_click" href="javascript:;" target="_blank"
                                               rel="nofollow">LV.${a.author.level!}</a>
                                        </div>
                                        <div class="desc clearfix">
                                            <a href="/wenda/detail?id=${q.id}" style=" color:#666;  line-height: 24px"
                                               target="_blank">${a.content.content}</a>

                                            <#--                                            <img-->
                                            <#--                                                    src="http://b1-q.mafengwo.net/s10/M00/43/95/wKgBZ1j3rQGAW3QRAAHbR_tI2xs02.jpeg?imageMogr2%2Fthumbnail%2F%21140x105r%2Fgravity%2FCenter%2Fcrop%2F%21140x105%2Fquality%2F90"-->
                                            <#--                                                    width="150" height="100">-->
                                            <#--                                            <p>-->
                                            <#--                                                在燃烧着”永恒之火"的草原上尽情吃肉在中国的饮食中，有许多食品都是从蒙古族那里传来的，如烤肉、涮羊肉等。似乎大家提到蒙古，都有一个感觉，那就是蒙古实在太爱吃肉了。其实蒙古人的饮食、是分为两个季节的，夏季和冬季。夏季为4月至10月，主要食物是奶制品...-->
                                            <#--                                            </p>-->
                                        </div>

                                    </div>
                                <#--                                    <div class="zan"><i></i>${q.answer.thumsupnum!0}</div>-->
                                </#list>

                                <div class="tags">
                                    <#if q.quesTags?? >
                                        <#list q.quesTags as tag>
                                            <a class="a-tag _j_filter_click" href="javascript:;"
                                               target="_blank">${tag.name!}</a>
                                        </#list>
                                    </#if>
                                </div>
                                <div class="operate" data-id="${q.id}">
                                    <div class="zan"><i></i>${(q.answers[0].thumsupnum)!0}</div>
                                    <div class="mdd"><a href="javascript:;" class="_j_filter_click" target="_blank"><i
                                                    class="_j_filter_click"></i>${(q.dest.name)!}</a></div>
                                    <div class="cate-share">
                                        <a class="_js_showShare _j_filter_click"></a>
                                        <!-- <div class="cate-share-pop _j_share_pop hide clearfix" data-title="我要去呼伦贝尔旅行，当地有哪些美食值得去吃？"
                                          data-qid="793682" data-aid="11747597" data-anum="148"
                                          data-content="在燃烧着”永恒之火&quot;的草原上尽情吃肉在中国的饮食中，有许多食品都是从蒙古族那里传来的，如烤肉、涮羊肉等。似乎大家提到蒙古，都有一个感觉，那就是蒙古实在太爱吃肉了。其实蒙古人的饮食、是分为两个季节的，夏季和冬季。夏季为4月至10月，主要食物是奶制品...">
                                          <a title="分享到新浪微博" class="sina _j_do_share _j_filter_click" data-site="wb"
                                            data-username="肉夹馍不会认输"></a>
                                          <a title="分享到QQ空间" class="zone _j_do_share _j_filter_click" data-site="qz"
                                            data-username="肉夹馍不会认输"></a>
                                          <a title="分享到微信" class="weixin _j_do_share_wx _j_filter_click" data-site="wx"
                                            data-username="肉夹馍不会认输"></a>
                                        </div> -->
                                    </div>
                                    <span class="reply">回答 (${q.answernum!0})</span>
                                    <span class="browse ">浏览 (${q.viewnum!0})</span>
                                    <span class="date ">发布于${q.createTime?string("yyyy-MM-dd HH:ss")}</span>
                                </div>
                            </div>

                        </li>
                    </ul>
                </div>
            </#list>
            <#include "../common/page.ftl">
        </div>
    </div>
    <script>
        $(function () {
            $('.operate').click(function () {
                var id = $(this).data('id');
                window.location.href = "/wenda/detail?id=" + id;
            })
        })
    </script>

    <div class="col-side">
        <a href="/wenda/input" class="btn-ask btn-ask2 header_nav_active" style=" font-size:20px;"><i></i>我要提问</a>
        <div class="rank _j_rank" style="margin-top: 20px;">

            <div class="hd">排行榜
                <ul class="tab-time">
                    <li class="_j_rank_change_date on" data-rank="1"><span>今日</span></li>
                    <li class="_j_rank_change_date" data-rank="2"><span>本周</span></li>
                    <li class="_j_rank_change_date" data-rank="3"><span>本月</span></li>
                </ul>
            </div>
            <div class="bd">
                <ul class="tab-num" data-cs-p="rank_list">
                    <li class="_j_rank_change_flag on" data-type="1" data-cs-d="金牌数">金牌数</li>
                    <li class="_j_rank_change_flag" data-type="2" data-cs-d="回答数">回答数</li>
                    <li class="_j_rank_change_flag" data-type="3" data-cs-d="被顶次数">被顶次数</li>
                </ul>
                <script>
                    $(function () {
                        var $rangeForm = $('#rangeForm');

                        $rangeForm.ajaxSubmit(function (data) {
                            $('.tab-num').after(data);
                        })

                        var tempType = 1;
                        var tempRank = 1;
                        var $JRankChangeDate = $('._j_rank_change_date');
                        $JRankChangeDate.click(function () {
                            $('.rank-list').remove();

                            var date = $(this);
                            var rank = date.data('rank');
                            tempRank = rank;
                            $('._j_rank_change_date').removeClass("on");
                            date.addClass('on');
                            $("#rangeForm input[name='condition']").val(tempType);
                            $("#rangeForm input[name='range']").val(rank);
                            $rangeForm.ajaxSubmit(function (data) {
                                $('.tab-num').after(data);
                            })
                        })

                        var $JRankChangeFlag = $('._j_rank_change_flag');
                        $JRankChangeFlag.click(function () {
                            $('.rank-list').remove();
                            var date = $(this);
                            var type = date.data('type')
                            tempType = type;
                            $('._j_rank_change_flag').removeClass("on");
                            date.addClass('on');
                            var $rangeForm = $('#rangeForm');
                            $("#rangeForm input[name='condition']").val(type);
                            $("#rangeForm input[name='range']").val(tempRank);
                            $rangeForm.ajaxSubmit(function (data) {
                                $('.tab-num').after(data);
                            })
                        })
                    })
                </script>
                <form action="/answer/rank" method="post" id="rangeForm">
                    <input type="hidden" name="condition" value="1">
                    <input type="hidden" name="range" value="1">
                </form>


            </div>
        </div>
    </div>
</div>
</body>

</html>